Skip to content

nixos/authelia: add options for SMTP secrets#416242

Open
stackptr wants to merge 3 commits intoNixOS:masterfrom
stackptr:authelia-secrets-smtp
Open

nixos/authelia: add options for SMTP secrets#416242
stackptr wants to merge 3 commits intoNixOS:masterfrom
stackptr:authelia-secrets-smtp

Conversation

@stackptr
Copy link
Copy Markdown
Contributor

Adds the following options for configuring Authelia to notify via SMTP:

  • services.authelia.instances.<name>.secrets.notifierSmtpPasswordFile
  • services.authelia.instances.<name>.secrets.notifierSmtpTlsCertificateChainFile
  • services.authelia.instances.<name>.secrets.notifierSmtpTlsPrivateKeyFile

These correspond to environment variables documented here: https://www.authelia.com/configuration/methods/secrets/

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • Nixpkgs 25.11 Release Notes (or backporting 24.11 and 25.05 Nixpkgs Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
  • NixOS 25.11 Release Notes (or backporting 24.11 and 25.05 NixOS Release notes)
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md, pkgs/README.md, maintainers/README.md and other contributing documentation in corresponding paths.

Add a 👍 reaction to pull requests you find important.

@github-actions github-actions bot added 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux. labels Jun 12, 2025
@stackptr stackptr force-pushed the authelia-secrets-smtp branch from 6705df7 to 836ee82 Compare June 12, 2025 21:27
};

notifierSmtpPasswordFile = mkOption {
type = types.nullOr types.path;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

types.path is usually not what you want: this accepts path literals and when somebody uses them wrongly (i.e. "${toString pathLiteral}" vs "${pathLiteral}") you end up silently copying things into your store.

pathWith is what you'll probably want.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to know! The existing options use types.path as well -- do you think it's appropriate for this PR to address those options, too?

@nixpkgs-ci nixpkgs-ci bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Dec 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md 6.topic: nixos Issues or PRs affecting NixOS modules, or package usability issues specific to NixOS 8.has: module (update) This PR changes an existing module in `nixos/` 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin. 10.rebuild-linux: 1-10 This PR causes between 1 and 10 packages to rebuild on Linux.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants